package com.liachen.stock.ext;

import cn.hutool.json.JSONObject;
import com.liachen.stock.entity.Notice;
import com.liachen.stock.entity.NoticeFile;
import com.liachen.stock.entity.Report;
import com.liachen.stock.entity.ZsStockInfo;
import com.liachen.stock.entity.ZsStockPool;
import com.liachen.stock.entity.etf.ZsEtfInfo;
import com.liachen.stock.ext.impl.ZsEtfBriefInfo;

import java.io.IOException;
import java.util.List;

/**
 * 芝士选股
 *
 * @author liangchen
 * @date 2021/4/2 13:36
 * @since V1.0
 */
public interface ZsxgService {
    /**
     * 获取研报列表
     * @throws IOException
     * @return
     */
    List<Report> getReportList() throws IOException;
    /**
     * 根据股票编码获取研报列表
     * @param code
     * @throws IOException
     * @return
     */
    List<Report> getReportListByCode(String code) throws IOException;
    /**
     * 获取公告列表
     * @return
     * @throws IOException
     */
    List<Notice> getNoticeList() throws IOException;

    /**
     * 根据股票编码获取公告列表
     * @param code
     * @return
     * @throws IOException
     */
    List<Notice> getNoticeListByCode(String code) throws IOException;

    /**
     * 获取公告链接
     * @param id
     * @return
     * @throws IOException
     */
    List<NoticeFile> getNoticeUrlList(int id) throws IOException;

    /**
     * 获取股票信息
     * @param stockCode
     * @return
     * @throws IOException
     */
    ZsStockInfo getStockInfo(String stockCode) throws IOException;

    /**
     * 获取股票池中股票列表
     * @param poolId
     * @return
     * @throws IOException
     */
    ZsStockPool getStockFromPool(String poolId) throws IOException;

    /**
     * 获取交易所交易基金信息
     *
     * @param etfCode etf代码
     * @return {@link ZsEtfInfo}
     * @throws IOException ioexception
     */
    ZsEtfInfo getEtfInfo(String etfCode) throws IOException;

    /**
     * 获取短暂信息
     *
     * @param type 类型
     * @return {@link ZsEtfBriefInfo}
     * @throws IOException ioexception
     */
    List<ZsEtfBriefInfo> getBriefInfo(List<String> type) throws IOException;

    /**
     * 获取历史pe
     * @return {@link JSONObject}
     * @throws IOException
     */
    JSONObject getPE(String code, String name) throws IOException;

    /**
     * 获取净利润
     * @return {@link JSONObject}
     * @throws IOException
     */
    JSONObject getNetProfit(String code, String name) throws IOException;

    JSONObject getConfig(Integer dataCacheId, String code, String name) throws IOException;
}
